/**
 * 在public/config.js 配置是部署或用户相关的配置，如后台服务器地址或用户所在省份配置
 * 会优先加载,
 * @type {object}
 */
const STATIC_CONFIG = window.__config__ || {};

// 默认进入的系统
export const DEFAULT_SYS_NAME = STATIC_CONFIG.DEFAULT_SYS_NAME || "pqs";
// 详细页面的路径后缀
export const DETAIL_NAME = "wpdetail";

export const LOGIN_PATH = "/login";

//接口服务名
export const SERVICE_NAME = STATIC_CONFIG.SERVICE_NAME || "";

// 登录页显示的名称
export const LOGIN_PROJECT_NAME = STATIC_CONFIG.LOGIN_PROJECT_NAME || "";

// 请求的基本url  不加斜杠
export const API_URL = STATIC_CONFIG.API_URL || "http://121.12.120.230:8765";

// 工作流url
export const WORKFLOW_URL = STATIC_CONFIG.WORKFLOW_URL || "http://121.12.120.61:7077";

// 项目相关
export const PROJECT_URL = STATIC_CONFIG.PROJECT_URL || "http://121.12.120.212:8144";

// 附件
export const FILE_URL = STATIC_CONFIG.API_URL || "http://121.12.120.42:9510";

// 图片预览
export const PRE_URL = STATIC_CONFIG.PRE_URL || "http://121.12.120.212:8138";

// PDF预览
export const PDF_URL = STATIC_CONFIG.PDF_URL || "http://121.12.120.50:8081/WPWS2/f?p=";

// 项目
export const ORG_URL = STATIC_CONFIG.ORG_URL || "http://121.12.120.212:8147";

// 人员
export const PERSON_URL = STATIC_CONFIG.PERSON_URL || "http://121.12.120.212:8146";

// 用户所在省份
export const PROVINCE = STATIC_CONFIG.PROVINCE || "广东省";

// 用户所在市城市定位点（统一使用经纬度）
export const DEF_CITYPOI = { lng: 116.378515, lat: 23.555476 }; //'揭阳市' 禁止使用城市定位，统一使用经纬度，地图超额配

export const PAGE_SIZE = [5, 10, 15, 20, 50];

export const MODE = STATIC_CONFIG.MODE;

export const P_BIT_IMG = STATIC_CONFIG.P_BIT_IMG || [
    ".png",
    ".jpg",
    ".jpeg",
    ".bmp",
    ".gif",
    ".PNG",
    ".JPG",
    ".JPEG",
    ".BMP",
    ".GIF",
    "png",
    "jpg",
    "jpeg",
    "bmp",
    "gif",
    "PNG",
    "JPG",
    "JPEG",
    "BMP",
    "GIF",
];

export const P_BIT_FILE = STATIC_CONFIG.P_BIT_FILE || [
    ".txt",
    ".xls",
    ".xlsx",
    ".doc",
    ".docx",
    ".pdf",
    ".TXT",
    ".XLS",
    ".XLSX",
    ".DOC",
    ".DOCX",
    ".PDF",
    "txt",
    "xls",
    "xlsx",
    "doc",
    "docx",
    "pdf",
    "TXT",
    "XLS",
    "XLSX",
    "DOC",
    "DOCX",
    "PDF",
];

// 系统菜单号
export const MD_TYPE_ID = STATIC_CONFIG.MD_TYPE_ID;

// 使用新方式的获取ukey信息（false：使用中间件，true：使用webscoket)
export const NEW_UKEY = STATIC_CONFIG.NEW_UKEY || false;

// 是否加载审核的附件
export const SHOW_SIGN_FILE = STATIC_CONFIG.SHOW_SIGN_FILE || false;

// 是否使用云签名
export const CLOUD_SIGN = STATIC_CONFIG.CLOUD_SIGN || false;

// 是否需要用户自己输入云证书密码 (承克gsm是false不需要用户输入，即后台处理）
export const NEED_CLOUD_PWD = STATIC_CONFIG.NEED_CLOUD_PWD || false;

// 是否配置审核并签名按钮
export const CONFIG_SIGN_BTN = STATIC_CONFIG.CONFIG_SIGN_BTN || "YES";

//登陆关键字
export const KET_LOGIN_KEYWORD = STATIC_CONFIG.KET_LOGIN_KEYWORD || "";

//铁科院签名
export const TKY_SIGN = STATIC_CONFIG.TKY_SIGN || true;

// 监理审核的步骤，显示
export const JL_SIGNSTEP = STATIC_CONFIG.JL_SIGNSTEP || 3;

export const FILE_VIEW = STATIC_CONFIG.FILE_VIEW;

export const ISProduct =
    STATIC_CONFIG?.ISProduct || window.location.origin.indexOf("apps.r93535.com") > -1;
//测试
window.ISProduct = ISProduct;

export const FILE_VIEW_ONLINE = STATIC_CONFIG?.FILE_VIEW_ONLINE;

// 项目文件预览地址
export const CURRENT_PER_URL = STATIC_CONFIG.CURRENT_PER_URL;

//铁科院正式地址
export const CURRENT_PRODUCTION_RUL = STATIC_CONFIG.CURRENT_PRODUCTION_RUL;
